package com.kun.controller;

import com.kun.pojo.Admin;
import com.kun.pojo.HandleOrder;
import com.kun.service.AdminService;
import com.kun.service.HandleOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Version:v1.0
 * @Author: 鲁坤
 * @Date: 2021-04-08
 * @ClassName: testController
 * @Description: TODO
 */
@RestController
public class TestController {
    @Autowired
    private HandleOrderService handleOrderService;
    @Autowired
    private AdminService adminService;

    @RequestMapping("/hhh")
    public List<HandleOrder> QueryIt(){
        List<HandleOrder> handleOrders = handleOrderService.queryAnswerByOid(5);
        return handleOrders;
    }
    @RequestMapping("/ha")
    public Admin QueryH(){
        Admin admin = (Admin)adminService.queryAdminByUsername("admin");
        return admin;
    }
}
